package fy.com.controller.main;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import fy.com.controller.base.BaseController;
import fy.com.entity.Page;
import fy.com.service.information.InformationService;
import fy.com.service.status.StatusService;
import fy.com.util.PageData;

@Controller
@RequestMapping(value="/map")
public class MapController extends BaseController{
	@Resource(name= "statusService")
	private StatusService statusService ;	
	@Resource(name= "informationService")
	private InformationService informationService ;
	
	@RequestMapping(value="/map")
	public ModelAndView map(Page page)throws Exception{
		ModelAndView mv=this.getModelAndView();
		PageData pd=new PageData();
		pd=this.getPageData(); 
		page.setPd(pd);
		List<PageData> dList =   informationService.list(page);
		List<PageData> sList = statusService.list(page) ;
		mv.addObject("dList", dList);
		mv.addObject("sList",sList);
		mv.setViewName("main/map");
		return mv;
		
	}

}
